﻿using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using PortaCapena.OdooJsonRpcClient.Attributes;
using PortaCapena.OdooJsonRpcClient.Converters;
using PortaCapena.OdooJsonRpcClient.Models;
using System;
using System.ComponentModel;
using System.Runtime.Serialization;


namespace OdooRpcClient.Model.Base
{
    [OdooTableName("res.country.state")]
    [JsonConverter(typeof(OdooModelConverter))]
    public class ResCountryStateOdooModel : IOdooModel
    {

        /// <summary>
        /// CountryId
        /// Many2one
        /// required
        /// res.country
        /// <summary>
        [JsonProperty("country_id")]
        [Description("CountryId")]
        public long CountryId { get; set; }

        /// <summary>
        /// Code
        /// Char
        /// The state code.
        /// required
        /// <summary>
        [JsonProperty("code")]
        [Description("Code")]
        public string Code { get; set; }

        /// <summary>
        /// Name
        /// Char
        /// Administrative divisions of a country. E.g. Fed. State, Departement, Canton
        /// required
        /// <summary>
        [JsonProperty("name")]
        [Description("Name")]
        public string Name { get; set; }

        /// <summary>
        /// Id
        /// Integer
        /// <summary>
        [JsonProperty("id")]
        [Description("Id")]
        public long Id { get; set; }

        /// <summary>
        /// DisplayName
        /// Char
        /// <summary>
        [JsonProperty("display_name")]
        [Description("DisplayName")]
        public string DisplayName { get; set; }

        /// <summary>
        /// CreateUid
        /// Many2one
        /// res.users
        /// <summary>
        [JsonProperty("create_uid")]
        [Description("CreateUid")]
        public long? CreateUid { get; set; }

        /// <summary>
        /// CreateDate
        /// Datetime
        /// <summary>
        [JsonProperty("create_date")]
        [Description("CreateDate")]
        public DateTime? CreateDate { get; set; }

        /// <summary>
        /// WriteUid
        /// Many2one
        /// res.users
        /// <summary>
        [JsonProperty("write_uid")]
        [Description("WriteUid")]
        public long? WriteUid { get; set; }

        /// <summary>
        /// WriteDate
        /// Datetime
        /// <summary>
        [JsonProperty("write_date")]
        [Description("WriteDate")]
        public DateTime? WriteDate { get; set; }

        /// <summary>
        /// LastUpdate
        /// Datetime
        /// <summary>
        [JsonProperty("__last_update")]
        [Description("LastUpdate")]
        public DateTime? LastUpdate { get; set; }
    }

}
